package edu.hubu.shop9.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import edu.hubu.shop9.entity.Department;
import edu.hubu.shop9.entity.SystemDictionaryDetail;
import edu.hubu.shop9.service.IDepartmentService;
import edu.hubu.shop9.service.ISystemDictionaryDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author waxijiang
 * @since 2021-07-26
 */
@RestController
@RequestMapping("/systemDictionaryDetail")
public class SystemDictionaryDetailController {
    @Autowired
    ISystemDictionaryDetailService systemDictionaryDetailService;

    @RequestMapping("selectAllUnit")
    public List<SystemDictionaryDetail> selectAllUnit() {
        List<SystemDictionaryDetail> list = systemDictionaryDetailService.list(new QueryWrapper<SystemDictionaryDetail>().eq("types_id", 2));
        return list;
    }

    @RequestMapping("selectAllBrand")
    public List<SystemDictionaryDetail> selectAllBrand() {
        List<SystemDictionaryDetail> list =
                systemDictionaryDetailService.list(new QueryWrapper<SystemDictionaryDetail>().eq("types_id", 1));
        return list;
    }
}

